#ifndef _GameController_h_
#define _GameController_h_

#include <iostream>
#include <string>
#include <vector>
using namespace std;

class GameComponent;

class GameController {
	public:
	static GameController *instance () {
			if (instance_ == NULL) {
				instance_ = new GameController();
		 }
		 return instance_;
	}

	static void kill () {
		if (instance_ != NULL) {
      cout << "[Killed game controller]" << endl;
			delete instance_;
			instance_ = NULL;
		}
	}

	void registerComponent				(GameComponent* comp);
	GameComponent *findComponent	(const string& id);

	private:
		GameController () {}
		~GameController();

	private:
		static GameController *instance_;
		vector<GameComponent *> components_;

};

#endif

